package com.ty.controller;

import com.ty.pojo.Rights;
import com.ty.service.RightsService;
import com.ty.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.List;

@RestController
@CrossOrigin
@EnableSwagger2
@RequestMapping("/rights")
public class RightsControoler {
    @Autowired
    private RightsService rightsService;
    //查询菜单
    @GetMapping("/getrightsList")
    public SysResult getrightsList(){
        List<Rights> rightsList = rightsService.getrightsList();
        return SysResult.success(rightsList);
    }
}
